/**
 * Por Joshua
 * Descripcion o proposito
 * @class Extmx.TooltipField
 *
 * @extends Object
 * @autor Ing. Josue Hernandez Gomez<br>
 *        joshua@extjs.mx<br>
 *        http://www.joshua.com.mx
 * @fecha 6/14/12 11:48 PM. Mexico DF
 */

Extmx.TooltipField= Ext.extend(Object, {
	//public
	init : function (parent) {
        this.too= new Ext.ToolTip({
                        target:parent.id,
                        ctCls:'go-tip',
                        anchor: 'left',
                        width:300,
                        dismissDelay: 15000, // auto hide after 15 seconds
                        html:parent.tooltip,
                        trackMouse:false
                    });

        parent.on({
            scope: this,
            focus: function (){
                this.too.show();
            },
            blur: function (){
                this.too.hide();
            }
        });
    },

    esconder: function (){
        this.too.hide();
    }
});

tooltipfield= Extmx.TooltipField;
